#include "sendbox.h"
#include "ui_sendbox.h"

SendBox::SendBox(QWidget *parent) :
    Box(parent),
    ui(new Ui::SendBox)
{
    ui->setupUi(this);
    ui->label_sendmessage->setTextInteractionFlags(Qt::TextSelectableByMouse);
    ui->label_sendmessage->setWordWrap(true);
    ui->label_sendavatar->setScaledContents(true);
}

SendBox::~SendBox()
{
    delete ui;
}


void SendBox::setAvatar(const QPixmap avatar)
{

    //QRegion region(ui->label->rect(), QRegion::Ellipse);
    //ui->label->setMask(region);
    ui->label_sendavatar->setPixmap(avatar);
}


void SendBox::setText(const QString text)
{
    ui->label_sendmessage->setText(text);
}

QSize SendBox::getSize(){
    return this->sizeHint();
}


